#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTcpSocket>
#include <QHostAddress>
#include <QDebug>
#include "test.h"
#include "register.h"
#include "login.h"
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void connect_server();
    void on_pushButton_test_clicked();


    void on_pushButton_log_clicked();

    void on_pushButton_reg_clicked();

private:
    Ui::Widget *ui;
    QTcpSocket *socket;
    test *testpage;
    Register *reg;
    Login *log;
    bool connect_state = false;
};
#endif // WIDGET_H
